<?php


namespace app\webs\controller;


use app\common\controller\Api;
use app\webs\model\FlowerModel;

class Flower extends Api
{
    public function index()
    {
        $index = FlowerModel::order('id','DESC')
            ->where('switch',1)
            ->select();
        if (!$index){
            $this->error('查询失败');
        }
        $this->success('查询成功',$index);
    }

}